package controle;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;


public class CriaConexaoListener extends Thread 
{ 
	private ServerSocket serverSocket;
		
	public void run()
	{		
		try
		{
			this.serverSocket = new ServerSocket(SocketControlConstants.portaConexaoChatListener);
			while(true)
			{	
				
				Socket conexao =  this.serverSocket.accept();
				CriaConexaoHandler criaConexaoHandler = new CriaConexaoHandler(conexao);
				criaConexaoHandler.start();
			}
		}	
		catch(IOException e){
			e.printStackTrace();
		}
	}
}
